<?php

function dme($var)
{
  echo "<pre>";
  print_r($var);
  echo "</pre>";
}

define('APPLICATION_ENV', 'development');

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require ('Zend/Loader/Autoloader.php');

$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('EasyBib');
Zend_Session::start();

require_once("/home/lukas/public_html/crawler/library/EasyBib_Form_Decorator-master/examples/ExampleForm.php");
// objects
$view = new Zend_View();
$form = new ExampleForm();
$form->setView($view);

// form config
$form->setMethod('POST');
$form->setAction('DecoratorExample.php');
$form->setAttrib('id', 'testForm');
$form->setAttrib('class', 'well');

if (!empty($_POST)) {
    $form->isValid($_POST);
    $form->getElement('email')->addError('test');
}

?>
<!DOCTYPE html>
<html>
    <head>
        <title>TestForm</title>
        <!-- <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css"> -->
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
    </head>
    <body>
       <h1>TestForm</h1>
       <?php echo $form; ?>
    </body>
</html>
<?
exit;
// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();

